package com.iotechn.unimall.admin.api.leaseCategory;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.LeaseCategoryDO;
import com.iotechn.unimall.data.domain.LeaseDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

/**
 * @author hct
 * @email 77802226@qq.com
 * @date 2020-07-20 14:21:25
 */
@HttpOpenApi(group = "admin.leaseCategory", description = "")
public interface AdminLeaseCategoryService {

    @HttpMethod(description = "列表", permission = "list", permissionParentName = "一分田", permissionName = "分区管理")
    Page<LeaseCategoryDO> list(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @HttpParam(name = "name", type = HttpParamType.COMMON, description = "名称") String name,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "创建", permission = "operation:leasecategory:create", permissionParentName = "一分田", permissionName = "分区管理")
    LeaseCategoryDO create(
            @NotNull @HttpParam(name = "leaseCategoryDO", type = HttpParamType.COMMON, description = "") LeaseCategoryDO leaseCategoryDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "operation:leasecategory:update", permissionParentName = "一分田", permissionName = "分区管理")
    String update(
            @NotNull @HttpParam(name = "leaseCategoryDO", type = HttpParamType.COMMON, description = "") LeaseCategoryDO leaseCategoryDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "operation:leasecategory:delete", permissionParentName = "一分田", permissionName = "分区管理")
    String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "operation:leasecategory:detail", permissionParentName = "一分田", permissionName = "分区管理")
    LeaseCategoryDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "批量删除", permission = "operation:news:batchdelete", permissionParentName = "一分田", permissionName = "分区管理")
    String batchDelete(
            @NotNull @HttpParam(name = "ids", type = HttpParamType.COMMON, description = "新闻Id") String ids,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId) throws ServiceException;

    @HttpMethod(description = "下拉列表")
    List<LeaseCategoryDO> select(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId) throws ServiceException;

}

